﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace CompositionPlugin.Service
{
    public interface IDataTemplateManager : IRuntimeService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataType"></param>
        /// <returns></returns>
        DataTemplate GetTemplate(Type dataType);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataTypeName"></param>
        /// <returns></returns>
        DataTemplate GetTemplate(string dataTypeName);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataType"></param>
        /// <param name="viewState"></param>
        /// <returns></returns>
        DataTemplate GetTemplate(Type dataType, string viewState);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataTypeName"></param>
        /// <param name="viewState"></param>
        /// <returns></returns>
        DataTemplate GetTemplate(string dataTypeName, string viewState);

        void Add(string dataTypename, IDataTemplateFactory factory);

        void Add(Type dataType, IDataTemplateFactory factory);

        void Add(string dataTypename, string viewState, IDataTemplateFactory factory);

        void Add(Type dataType, string viewState, IDataTemplateFactory factory);
    }
}
